#!/usr/etc/env/ python
# -*- coding:utf-8 -*-
from flask import Flask, request
app = Flask(__name__)
app.debug = True

@app.route('/hello',methods=['GET'])
def hello():
    print request.args.get('param1')
    print request.args.get('param2')
    return 'hello'
#测试环境管理器
with app.test_request_context('hello',method="POST"):
    assert request.path == '/hello'
    assert request.method == 'POST'

if __name__ == '__main__':
    app.run()
